<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>{$eju.field.seo_title}</title>
  <meta name="renderer" content="webkit" />
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=0,minimal-ui" />
  <meta name="description" content="{$eju.field.seo_description}" />
  <meta name="keywords" content="{$eju.field.seo_keywords}" />
  <link href="{eju:global name='web_cmspath' /}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  {eju:static file="skin/css/public.css" /}
  {eju:static file="skin/css/iconfont.css" /}
  {eju:static file="skin/css/kft_list.css" /}
  {eju:static file="skin/css/kft_right.css" /}
  {eju:static file="skin/js/jquery.min.1.7.2.js" /}
  {eju:static file="skin/js/top_footer.js" /}
  {eju:static file="skin/js/jquery.ajax.form.js" /}
  <script type="text/javascript">
  function showTime(tuanid, time_distance) {

  	this.tuanid = tuanid;
  	//PHP时间是秒，JS时间是微秒
      var timestamp = (new Date()).getTime();
  	this.time_distance = time_distance * 1000 - timestamp;
  }
  showTime.prototype.setTimeShow = function () {
  	var timer = $("#lefttime_" + this.tuanid);
  	var btn_baoming = $("#btn_baoming_" + this.tuanid);
  	var str_time;
  	var int_day, int_hour, int_minute, int_second;
  	time_distance = this.time_distance;
  	this.time_distance = this.time_distance - 1000;
  	if (time_distance > 0) {
  		int_day = Math.floor(time_distance / 86400000);
  		time_distance -= int_day * 86400000;
  		int_hour = Math.floor(time_distance / 3600000);
  		time_distance -= int_hour * 3600000;
  		int_minute = Math.floor(time_distance / 60000);
  		time_distance -= int_minute * 60000;
  		int_second = Math.floor(time_distance / 1000);
  		if (int_hour < 10)
  			int_hour = "0" + int_hour;
  		if (int_minute < 10)
  			int_minute = "0" + int_minute;
  		if (int_second < 10)
  			int_second = "0" + int_second;
  		str_time = "距离报名结束还有<em class='data-day'>"+int_day + "</em>天<em class='data-hour'>" + int_hour + "</em>小时<em class='data-minute'>" + int_minute + "</em>分钟<em class='data-sec'>" + int_second + "</em>秒";
  		timer.html(str_time);
  		var self = this;
  		setTimeout(function () { self.setTimeShow(); }, 1000); //D:正确
  	} else {
  		btn_baoming.html("报名结束");
          btn_baoming.prop("class","btn-end right");
  		timer.text("结束");
  		return;
  	}
  }
  </script>
</head>

<body>
{eju:include file="header.htm"/}
<div class="kft-main">
  <div class="kft-list left">
    <div class="kft-banner"> </div>
    <div class="list-main">
      <ul>
        {eju:list addfields="apply_num,end_time" pagesize="10" titlelen="20" orderby='new' id='field'}
        <li>
          <div class="list-img left"> 
            <a href="{$field.arcurl}" target="_blank"> <img src="{$field.litpic}" width="350" height="280"/> </a> 
          </div>
          {eju:arcview aid='$field.joinaid' addfields='discount' id='field2'}
          <div class="list-info right">
            <div class="list-head"> 
              <a href="{$field.arcurl}" target="_blank">
                <h3>{$field.title}</h3>
              </a> 
              <span>已有{$field.apply_num}人报名</span> 
                <a class="list-zx" href="http://wpa.qq.com/msgrd?v=3&uin={$field.saleman.saleman_qq}&site=qq&menu=yes"> 【立即咨询】 </a>
            </div>
            {eju:notempty name='$field2.is_discount'} 
              <a href="{$field.arcurl}" target="_blank">
                <p class="list-dg">[优惠]{$field2.discount}</p>
              </a> 
            {/eju:notempty} 
            <!-- <p class="list-dz">地址：海南省海口市龙华区羊山大道观澜湖</p> -->
            <div class="list-data">
              <p id="lefttime_{$e}"></p>
              {eju:if condition="$field.end_time > time()"} 
                <a id="btn_baoming_{$e}" class="btn-ljbm dialog right" href="javascript:;" data-uri="{eju:diyurl type='form' /}">立即报名</a> 
              {else /} 
                <a id="btn_baoming_{$e}" class="btn-end right" href="javascript:;" data-uri="{eju:diyurl type='form' /}">报名结束</a> 
              {/eju:if}
              <script type="text/javascript">
                  var st = new showTime("{$e}","{$field.end_time}");
                  st.setTimeShow();
              </script> 
            </div>
          </div>
          {/eju:arcview}
          <div class="clear"></div>
        </li>
        {/eju:list}
      </ul>
    </div>
    <!--页码-->
    <div class="page-box">
      <ul class="pagination">
        {eju:pagelist listitem="index,end,pageno,pre,next" listsize="10"/}
      </ul>
    </div>
  </div>
  {eju:include file="right_tuan.htm"/}
  <div class="clear"></div>
</div>
{eju:include file="footer.htm"/}
{eju:static file="skin/js/carousel.min.js" /}
{eju:static file="skin/layer/layer.min.js" /} 
<script type="text/javascript">
$(function() {
    $(".detail_slide").thumbnailImg({
        large_elem : ".large_box",
        small_elem : ".small_list",
        left_btn : ".left_btn",
        right_btn : ".right_btn"
    });
    $('.dialog').bind('click',function(){
        var url = $(this).data('uri');
        $.layer({
                type: 2,
                shadeClose: true,  
                title: false,  
                closeBtn: [1, true],  
                shade: [0.8, '#000'],  
                border: [0],  
                area: ['500px', '330px'],
                offset: ['165px',''],  
                iframe: {src: url}  
            }); 
    });
});
//shangqiao
function chat(url) {
    //获得窗口的垂直位置
    var iTop = (window.screen.height - 710) / 2;
    //获得窗口的水平位置
    var iLeft = (window.screen.width - 780) / 2;
    window.open(url,"_blank","left="+iLeft+",top="+iTop+",width=780,height=710,toolbar=no,menubar=no,scrollbars=no" );
}
</script>
</body>
</html>